package com.android.aishangauction.activity.mine;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;

import com.android.aishangauction.MainActivity;
import com.android.aishangauction.R;
import com.android.aishangauction.activity.MainTab;
import com.android.aishangauction.app.BaseActivity;
import com.android.aishangauction.utils.ConstantsUrl;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/9/2.
 */

public class PaySuccessActivity extends BaseActivity {
    @BindView(R.id.main_top_bg)
    Toolbar mainTopBg;
    @BindView(R.id.backto_mainpage)
    TextView toMain;
    @BindView(R.id.check_payorder)
    TextView toOrder;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_paysuccess);
        ButterKnife.bind(this);
        initTitle(0, "支付成功");
        initUI();
    }

    private void initUI() {

    }

    @OnClick({R.id.backto_mainpage, R.id.check_payorder
    })
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.backto_mainpage:
                Intent intent = new Intent(this, MainActivity.class);
                intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                intent.putExtra("TabSelect",0);
                startActivity(intent);
                break;
            case R.id.check_payorder:
                Intent intentOrder = new Intent(this, MainTab.class);
                intentOrder.putExtra(ConstantsUrl.INTENT_KEY.MAIN_GROUP_TAB_SORT_SHOW_ID, 0);
                intentOrder.putExtra(ConstantsUrl.INTENT_KEY.MAIN_GROUP_TAB_SORT_SHOW_TYPE, 8);
                intentOrder.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                intentOrder.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                startActivity(intentOrder);
                finish();
                break;
        }
    }
}
